const router = require('koa-router')();


// 手机菜单列表
router.post('/user/getMenuListV4', async ctx => {
    let list = [
        // {id: 1, pid: 0,title: '客户拜访',routeName: 'bf',path: 'bf',component: 'bf/bf',pageName:'',tag:'',addRoute: '',},
        // {id: 2, pid: 0,title: '拜访记录',routeName: 'bfMy',path: 'bfMy',component: 'bf/bfMy',pageName:'',tag:'',addRoute: '',},
        // {id: 3, pid: 0,title: '拜访轨迹',routeName: 'bfGj',path: 'bfGj',component: 'bf/bfGj',pageName:'',tag:'',addRoute: '',},
        // {id: 4, pid: 0,title: '新增客户',routeName: 'contactAdd',path: 'contactAdd',component: 'contact/contactAdd',pageName:'',tag:'',addRoute: '',},
        // {id: 5, pid: 0,title: '我的客户',routeName: 'contactMy',path: 'contactMy',component: 'contact/contactMy',pageName:'',tag:'',addRoute: '',},
        // {id: 6, pid: 0,title: '拜访首页',routeName: 'bfHome',path: 'contactMy',component: 'contact/contactMy',pageName:'',tag:'',addRoute: '',},
        // {id: 7, pid: 0,title: '新增收款',routeName: 'addSk',path: 'addSk',component: 'sk/addSk',pageName:'',tag:'',addRoute: '',},
        // {id: 8, pid: 0,title: '交款核对',routeName: 'jkhd',path: 'jkhd',component: 'sk/jkhd',pageName:'',tag:'',addRoute: '',},
        // {id: 9, pid: 0,title: '收款记录',routeName: 'skJl',path: 'skJl',component: 'sk/skJl',pageName:'',tag:'',addRoute: '',},
        // {id: 10, pid: 0,title: '收款统计',routeName: 'skTj',path: 'skTj',component: 'sk/skTj',pageName:'',tag:'',addRoute: '',},
        // {id: 11, pid: 0,title: '票据筛选',routeName: 'billFind',path: 'billFind',component: 'sk/billFind',pageName:'',tag:'',addRoute: '',},
        // {id: 12, pid: 0,title: '领单收款',routeName: 'appLdsk',path: 'appLdsk',component: 'sk/appLdsk',pageName:'',tag:'',addRoute: '',},
        // {id: 13, pid: 0,title: '应收查询',routeName: 'appYs',path: 'appYs',component: 'sk/appYs',pageName:'',tag:'',addRoute: '',},
        // {id: 14, pid: 0,title: '收款明细',routeName: 'skDetail',path: 'skDetail',component: 'sk/skDetail',pageName:'',tag:'',addRoute: '',},
        // {id: 15, pid: 0,title: '商品管理',routeName: 'goods',path: 'goods',component: 'stock/goods',pageName:'',tag:'',addRoute: '',},
        {id: 1, pid: 0,title: '库存',routeName: 'kc',path: 'kc',component: 'stock/kc',pageName:'',tag:'',addRoute: '',},
        {id: 2, pid: 0,title: '客户',routeName: 'goods',path: 'goods',component: 'stock/goods',pageName:'',tag:'',addRoute: '',},
        {id: 3, pid: 0,title: '商品管理',routeName: 'goods',path: 'goods',component: 'stock/goods',pageName:'',tag:'',addRoute: '',},
        {id: 4, pid: 0,title: '新增商品',routeName: 'addGood',path: 'addGood',component: 'stock/addGood',pageName:'',tag:'',addRoute: '',},
        {id: 5, pid: 0,title: '入库',routeName: 'rk',path: 'rk',component: 'stock/rk',pageName:'',tag:'',addRoute: '',},
        {id: 6, pid: 0,title: '零售',routeName: 'ls',path: 'ls',component: 'stock/ls',pageName:'',tag:'',addRoute: '',},
    ]
    return ctx.suc('', list)
})
// 保存常用菜单
// 手机工作台菜单
// 手机要显示的菜单
router.post('/menu/getAppMenu', async ctx => {
    let ret = [
        {
            title: '业务', color: '#1e9fff', list: [
                {title: '入库', route: 'rk', icon: 'fa fa-cubes'},
                {title: '零售', route: 'ls', icon: 'fa fa-shopping-bag'},
                // {title: '收款记录', route: 'skJl', icon: 'fa fa-list-ol'},
                // {title: '收款统计', route: 'skTj', icon: 'fa fa-pie-chart'},
            ]
        },
        {
            title: '资料', color: '#F56C6C', list: [
                {title: '商品管理', route: 'goods', icon: 'fa fa-cube'},
                // {title: '客户拜访', route: 'bf', icon: 'fa fa-user'},
                // // {title: '我的拜访', route: 'bfMy', icon: tool.getPicUrl('appicon/我的拜访.png').url},
                // {title: '拜访记录', route: 'bfMy', icon: ''},
                // // {title: '全部客户', route: 'customerList', icon: tool.getPicUrl('appicon/全部客户.png').url},
                // {title: '拜访轨迹', route: 'bfGj', icon: ''},
                // {title: '新增客户', route: 'contactAdd', icon: ''},
                // {title: '我的客户', route: 'contactMy', icon: ''},
            ]
        },
        // {
        //     title: '资料设置', color: '#1e9fff', list: [
        //         {title: '用户管理', route: 'user', icon: ''},
        //         // {title: '拜访设置', route: 'bfSets', icon: tool.getPicUrl('appicon/拜访设置.png').url},
        //         {title: '拜访线路', route: 'bfLine', icon: ''},
        //         // {title: '奖品管理', route: 'jpgl', icon: tool.getPicUrl('appicon/奖品管理.png').url},
        //         {title: '客户分类', route: 'customerCategoryList', icon: ''},
        //         {title: '部门设置', route: 'dept', icon: ''},
        //         // {title: '角色设置', route: 'role', icon: tool.getPicUrl('appicon/角色设置.png').url},
        //     ]
        // }
    ]
    return ctx.suc('', ret)
})


module.exports = router;
